package com.nifostasky.blog.task;

import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.scheduling.quartz.QuartzJobBean;

import java.text.SimpleDateFormat;
import java.util.Date;

public class MyJobTask2 extends QuartzJobBean {
//    @Autowired
//    private ScheduleJobLogService scheduleJobLogService;

    /**
     *
     * @param jobExecutionContext
     * @throws JobExecutionException
     */
    @Override
    protected void executeInternal(JobExecutionContext jobExecutionContext) throws JobExecutionException {
//        List<ScheduleJobLog> list = scheduleJobLogService.list();
        System.out.println("动态执行定时任务的时间"+ new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()) );
//        System.out.println(list.toString());
    }
}
